package com.chenyun.gateway.dynamic.service;

import org.springframework.cloud.gateway.route.RouteDefinition;
import org.springframework.http.ResponseEntity;
import reactor.core.publisher.Mono;

/**
 * 用于动态添加路由服务类
 * @author: Lonni
 * @date: 2022/11/18 0018 10:52
 */
public interface RouteService {

    /**
     * 添加路由
     * @param routeDefinition
     * @return
     */
    public Boolean addRoute(RouteDefinition routeDefinition);

    /**
     * 很据路由id删除路由配置
     * @param routeId
     * @return
     */
    public Mono<ResponseEntity<Object>> deleteRoute(String routeId);

    /**
     * 更新路由配置
     * @param routeDefinition
     * @return
     */
    public Boolean updateRoute(RouteDefinition routeDefinition);

}
